Detection of Non Continguous Clones in Software using Program Slicing
نویسندگان
چکیده
Code duplication or copying a code fragment and then reuse by pasting with or without any modifcations is a well known code smell in software maintenance. Several studies show that about 5% to 20% of a software systems can contain duplicated code,which is basically the results of copying existing code fragments and using then by pasting with or without minor modifcations. Software cloning is copying of code fragment from one source code and using it in another source code. Cloning of software code has bad impact. One of the major problem of such duplicated fragments is that if a bug is find out in a code fragment, all the other fragments similar to it should need to check. For code clone detection, many detection techniques are there with different code intermediate representation techniques. This paper proposes a clone detection technique using program slicing with matching technique. The aim of the proposed approach is detection of three types of clone i.e. type 1 (exact match), type 2 (parameterized match) type 3 (near-miss match). The technique also detects non-contiguous clones.
منابع مشابه
Using Program Slicing Technique to Reduce the Cost of Software Testing
Systems of computers and their application in the lives of modern human beings are vastly expanding. In any kind of computer application, failure in computer systems can lead to a range of financial and mortal losses. Indeed, the major origin of software failure can be located in designing or implementing software. With regard to these statistics, 30% of the software projects have been prospero...
متن کاملUsing Slicing to Identify Duplication in Source Code
Programs often have a lot of duplicated code, which makes both understanding and maintenance more difficult. This problem can be alleviated by detecting duplicated code, extracting it into a separate new procedure, and replacing all the clones (the instances of the duplicated code) by calls to the new procedure. This paper describes the design and initial implementation of a tool that finds clo...
متن کاملUsing Program Slicing to Identify Faults in Software
This study explores the relationship between program slices and faults. The aim is to investigate whether the characteristics of program slices can be used to identify faultprone software components. Slicing metrics and dependence clusters are used to characterise the slicing profile of a software component, then the relationship between the slicing profile of the component and the faults in th...
متن کاملDetecting Refactorable Clones by Slicing Program Dependence Graphs
Code duplication in a program can make understanding and maintenance difficult. The problem can be reduced by detecting duplicated code, refactoring it into a separate procedure, and replacing all the clones by appropriate calls to the new procedure. In this paper, we report on a confirmatory replication of a tool that was used to detect such refactorable clones based on program dependence grap...
متن کاملEfficient Program Slicing Algorithms for Measuring Functional Cohesion and Parallelism
Program slicing is the task of finding all statements in a program that directly or indirectly influence the value of a variable occurrence. The set of statements that can affect the value of a variable at some point in a program is called a program slice. In several software engineering applications, such as program debugging and measuring program cohesion and parallelism, several slices are c...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2015